﻿using System;

namespace Heimdallr
{ 
    /// <summary>
    /// Define a <see cref="ServiceElement"/> as a notification publisher.
    /// </summary>
    public interface INotifyElement
    { 
        /// <summary>
        /// Publishes a notification via this element.
        /// </summary>
        /// <param name="notification">A notification which is going to be published.</param>
        /// <exception cref="ArgumentNullException">Parameter <paramref name="notification"/> is null.</exception>
        /// <exception cref="InvalidOperationException">This element has not been started.</exception>
        void Publish(Notification notification);
    }
}